:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --error-color: #e74c3c;
  --background-color: #f8f9fa;
  --text-color: #333;
  --border-color: #ddd;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

button, .button {
  cursor: pointer;
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  transition: background-color 0.3s;
}

button:hover, .button:hover {
  background-color: #2980b9;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.error-text {
  color: var(--error-color);
}

.success-text {
  color: var(--secondary-color);
}

/* Card styles */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Form styles */
input, select, textarea {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
}

/* Navigation */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background-color: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-link {
  margin-left: 1rem;
  color: var(--primary-color);
  font-weight: 500;
}

/* Error frequency indicator */
.error-indicator {
  display: inline-block;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  margin-right: 8px;
}

.error-low {
  background-color: rgba(231, 76, 60, 0.3);
}

.error-medium {
  background-color: rgba(231, 76, 60, 0.6);
}

.error-high {
  background-color: rgba(231, 76, 60, 0.9);
}

/* 题目浏览页面 */
.browse-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.question-item {
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  padding: 20px;
  position: relative;
}

.question-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.question-number {
  font-weight: bold;
  margin-right: 10px;
  background-color: #4a6da7;
  color: white;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.question-id {
  color: #666;
  font-size: 0.9em;
  margin-right: 15px;
}

.question-category {
  background-color: #f0f5ff;
  padding: 4px 10px;
  border-radius: 15px;
  font-size: 0.8em;
  color: #3a5a97;
}

.question-content {
  margin-bottom: 20px;
  line-height: 1.6;
}

.question-options {
  margin-top: 15px;
}

.option {
  padding: 8px 12px;
  margin-bottom: 8px;
  border-radius: 4px;
  background-color: #f7f9fc;
  transition: background-color 0.2s;
}

.option:hover {
  background-color: #eef2f9;
}

.correct-option {
  background-color: #e6ffe6;
  border-left: 3px solid #4caf50;
}

.question-actions {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.toggle-answer-btn, .ai-analyze-btn, .get-explanation-btn {
  background-color: #4a6da7;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
}

.toggle-answer-btn:hover, .ai-analyze-btn:hover, .get-explanation-btn:hover {
  background-color: #3c5a8a;
}

.toggle-answer-btn {
  margin-right: 10px;
}

.answer-section {
  background-color: #f9fbff;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
}

.answer {
  margin-bottom: 15px;
  font-weight: 500;
}

.explanation {
  line-height: 1.6;
}

.explanation-content {
  margin-top: 10px;
  padding-left: 15px;
  border-left: 3px solid #e0e7ff;
}

.loading-spinner {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.analysis-status {
  margin-left: 10px;
  font-size: 14px;
  padding: 2px 8px;
  border-radius: 4px;
}

.analysis-status.success {
  background-color: rgba(0, 128, 0, 0.1);
  color: green;
}

.analysis-status.error {
  background-color: rgba(255, 0, 0, 0.1);
  color: red;
}

.ai-analyze-btn.analyzing {
  background-color: #4a6da7;
  cursor: wait;
}

.ai-analyze-btn.analysis-error {
  background-color: #a74a4a;
}

/* 分类导航 */
.categories-nav {
  margin-bottom: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-item {
  background-color: #f0f5ff;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.category-item:hover {
  background-color: #e0e7ff;
}

.category-item.active {
  background-color: #4a6da7;
  color: white;
}

/* 操作按钮区域 */
.actions-container {
  margin-bottom: 25px;
  padding: 15px;
  background-color: #f7f9fc;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.action-btn {
  background-color: #4a6da7;
  color: white;
  border: none;
  border-radius: 4px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.action-btn:hover {
  background-color: #3c5a8a;
}

.action-btn:disabled {
  background-color: #9eb0c8;
  cursor: not-allowed;
}

.status-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 4px;
}

.status-success {
  background-color: #e6ffe6;
  color: #2e7d32;
}

.status-error {
  background-color: #ffebee;
  color: #c62828;
}

/* 右键菜单 */
.context-menu {
  position: fixed;
  background-color: white;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 8px 0;
  z-index: 1000;
}

.menu-item {
  padding: 8px 16px;
  cursor: pointer;
}

.menu-item:hover {
  background-color: #f5f5f5;
}

.error-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 10px;
}

.error-low {
  background-color: #ffca28;
}

.error-medium {
  background-color: #ff9800;
}

.error-high {
  background-color: #f44336;
} 